package com.framework.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;

//@Controller
//@RequestMapping("/user")
//public class UserController {
//
//    @PostMapping("register")
//    @ResponseBody
//    public String register(User user){
//        System.out.println(user);
//        return "success";
//    }
//}

@Controller
@RequestMapping(value = "/user",method = RequestMethod.GET)
public class UserController {

    @PostMapping("hobby")
    @ResponseBody
    public String addHobby(@RequestParam ArrayList<String> hobby){
        System.out.println(hobby);
        return "success";
    }
}
